<!DOCTYPE html>
<html manifest="applicationCache.cache">
<!--<html>-->
<head lang="en">
    <meta charset="UTF-8">
    <title>缓存</title>
</head>
<body>

    <script>
        window.addEventListener('load', function(e) {
            window.applicationCache && window.applicationCache.addEventListener('updateready', function(e) {
                if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
                    window.applicationCache.swapCache();
                    window.parent.location.reload();
                }
            }, false);
        }, false);

        console.log(window.parent.location.href);

    </script>

</body>
</html>